﻿using System;

class Program
{
    static void Main()
    {
        int i;
        int a = 0;
        int b = 1;
        int sum = 0;
        Console.Write("N: ");
        int n = int.Parse(Console.ReadLine());
        for (i = 0; i <= n-1; i++)
        {
            int c = a;
            a = b;
            b = c + b;
            sum += c;
            Console.WriteLine(c);
        }
        Console.WriteLine("Sum = "+sum);
    }
}